﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Newtonsoft.Json;

namespace MVCDemo.Models
{
    [MetadataType(typeof(EmployeeMetadata))]
    public partial class Employees
    {
    }


    public class EmployeeMetadata
    {
        [HiddenInput(DisplayValue = false)]
        public int EmployeeID { get; set; }


        [DisplayAttribute(Name = "姓")]
        public string LastName { get; set; }

        [DisplayFormat(DataFormatString ="{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
        public DateTime? HireDate { get; set; }

        [ReadOnly(true)]
        public DateTime? BirthDate{ get; set; }

        [DisplayFormat(NullDisplayText = "Region not specified")]
        public string Region { get; set; }

        [ScaffoldColumn(false)]
        public byte[] Photo { get; set; }

        [DataType(DataType.Url)]
        [UIHint("OpenInNewWindow")]
        public string PhotoPath { get; set; }




        
    }
}